package com.yc154.springmvc1.demos.biz;

import com.yc154.springmvc1.demos.entity.User;
import org.springframework.stereotype.Service;

@Service
public class UserBiz {

    public void reg(User user) throws BizException{
        if(user.getName().equals("admin")){
            throw new BizException("该用户已经注册", user);
        }
        System.out.println("用户注册成功! " + user);
    }

}
